/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.minam.beans;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Alvaro
 */
@Entity
@Table(name = "SCAMVD_INVENTARIO")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ScamvdInventario.findAll", query = "SELECT s FROM ScamvdInventario s"),
    @NamedQuery(name = "ScamvdInventario.findByIdEsta", query = "SELECT s FROM ScamvdInventario s WHERE s.scamvdInventarioPK.idEsta = :idEsta"),
    @NamedQuery(name = "ScamvdInventario.findByIdInven", query = "SELECT s FROM ScamvdInventario s WHERE s.scamvdInventarioPK.idInven = :idInven"),
    @NamedQuery(name = "ScamvdInventario.findByVSerie", query = "SELECT s FROM ScamvdInventario s WHERE s.vSerie = :vSerie"),
    @NamedQuery(name = "ScamvdInventario.findByVNomEq", query = "SELECT s FROM ScamvdInventario s WHERE s.vNomEq = :vNomEq"),
    @NamedQuery(name = "ScamvdInventario.findByVModEq", query = "SELECT s FROM ScamvdInventario s WHERE s.vModEq = :vModEq"),
    @NamedQuery(name = "ScamvdInventario.findByVDetEq", query = "SELECT s FROM ScamvdInventario s WHERE s.vDetEq = :vDetEq"),
    @NamedQuery(name = "ScamvdInventario.findByVSensor", query = "SELECT s FROM ScamvdInventario s WHERE s.vSensor = :vSensor"),
    @NamedQuery(name = "ScamvdInventario.findByIdVar", query = "SELECT s FROM ScamvdInventario s WHERE s.idVar = :idVar"),
    @NamedQuery(name = "ScamvdInventario.findByVFrecMuestreo", query = "SELECT s FROM ScamvdInventario s WHERE s.vFrecMuestreo = :vFrecMuestreo"),
    @NamedQuery(name = "ScamvdInventario.findByIdPeriodo", query = "SELECT s FROM ScamvdInventario s WHERE s.idPeriodo = :idPeriodo"),
    @NamedQuery(name = "ScamvdInventario.findByIdEstado", query = "SELECT s FROM ScamvdInventario s WHERE s.idEstado = :idEstado"),
    @NamedQuery(name = "ScamvdInventario.findByVMetodo", query = "SELECT s FROM ScamvdInventario s WHERE s.vMetodo = :vMetodo"),
    @NamedQuery(name = "ScamvdInventario.findByIdUser", query = "SELECT s FROM ScamvdInventario s WHERE s.idUser = :idUser")})
public class ScamvdInventario implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected ScamvdInventarioPK scamvdInventarioPK;
    @Size(max = 20)
    @Column(name = "V_SERIE")
    private String vSerie;
    @Size(max = 300)
    @Column(name = "V_NOM_EQ")
    private String vNomEq;
    @Size(max = 50)
    @Column(name = "V_MOD_EQ")
    private String vModEq;
    @Size(max = 300)
    @Column(name = "V_DET_EQ")
    private String vDetEq;
    @Size(max = 300)
    @Column(name = "V_SENSOR")
    private String vSensor;
    @Column(name = "ID_VAR")
    private BigInteger idVar;
    @Size(max = 50)
    @Column(name = "V_FREC_MUESTREO")
    private String vFrecMuestreo;
    @Column(name = "ID_PERIODO")
    private BigInteger idPeriodo;
    @Column(name = "ID_ESTADO")
    private BigInteger idEstado;
    @Size(max = 300)
    @Column(name = "V_METODO")
    private String vMetodo;
    @Column(name = "ID_USER")
    private BigInteger idUser;

    public ScamvdInventario() {
    }

    public ScamvdInventario(ScamvdInventarioPK scamvdInventarioPK) {
        this.scamvdInventarioPK = scamvdInventarioPK;
    }

    public ScamvdInventario(BigInteger idEsta, BigInteger idInven) {
        this.scamvdInventarioPK = new ScamvdInventarioPK(idEsta, idInven);
    }

    public ScamvdInventarioPK getScamvdInventarioPK() {
        return scamvdInventarioPK;
    }

    public void setScamvdInventarioPK(ScamvdInventarioPK scamvdInventarioPK) {
        this.scamvdInventarioPK = scamvdInventarioPK;
    }

    public String getVSerie() {
        return vSerie;
    }

    public void setVSerie(String vSerie) {
        this.vSerie = vSerie;
    }

    public String getVNomEq() {
        return vNomEq;
    }

    public void setVNomEq(String vNomEq) {
        this.vNomEq = vNomEq;
    }

    public String getVModEq() {
        return vModEq;
    }

    public void setVModEq(String vModEq) {
        this.vModEq = vModEq;
    }

    public String getVDetEq() {
        return vDetEq;
    }

    public void setVDetEq(String vDetEq) {
        this.vDetEq = vDetEq;
    }

    public String getVSensor() {
        return vSensor;
    }

    public void setVSensor(String vSensor) {
        this.vSensor = vSensor;
    }

    public BigInteger getIdVar() {
        return idVar;
    }

    public void setIdVar(BigInteger idVar) {
        this.idVar = idVar;
    }

    public String getVFrecMuestreo() {
        return vFrecMuestreo;
    }

    public void setVFrecMuestreo(String vFrecMuestreo) {
        this.vFrecMuestreo = vFrecMuestreo;
    }

    public BigInteger getIdPeriodo() {
        return idPeriodo;
    }

    public void setIdPeriodo(BigInteger idPeriodo) {
        this.idPeriodo = idPeriodo;
    }

    public BigInteger getIdEstado() {
        return idEstado;
    }

    public void setIdEstado(BigInteger idEstado) {
        this.idEstado = idEstado;
    }

    public String getVMetodo() {
        return vMetodo;
    }

    public void setVMetodo(String vMetodo) {
        this.vMetodo = vMetodo;
    }

    public BigInteger getIdUser() {
        return idUser;
    }

    public void setIdUser(BigInteger idUser) {
        this.idUser = idUser;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (scamvdInventarioPK != null ? scamvdInventarioPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ScamvdInventario)) {
            return false;
        }
        ScamvdInventario other = (ScamvdInventario) object;
        if ((this.scamvdInventarioPK == null && other.scamvdInventarioPK != null) || (this.scamvdInventarioPK != null && !this.scamvdInventarioPK.equals(other.scamvdInventarioPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.com.minam.beans.ScamvdInventario[ scamvdInventarioPK=" + scamvdInventarioPK + " ]";
    }
    
}
